const { DataTypes } = require("sequelize");
const sequelize = require("./index");

const ExtendArticleType = sequelize.define(
    "extend_article_type",
    {
        id: {
            type: DataTypes.INTEGER,
            primaryKey: true,
            allowNull: false,
            autoIncrement: true,
        },
        title: {
            type: DataTypes.STRING,
            allowNull: false,
        },
    },
    {
        timestamps: false,
    }
);

ExtendArticleType.associate = ({ extendArticle }) => {
    ExtendArticleType.hasMany(extendArticle);
};

module.exports = ExtendArticleType;
